<template>
    <nut-tabs v-model="state.tabKey" color="#f6794b" @change="tabsChange" swipeable>
        <nut-tab-pane title="推荐" pane-key="1"> Content 1 </nut-tab-pane>
        <nut-tab-pane title="搜索" pane-key="2"> Content 2 </nut-tab-pane>
    </nut-tabs>
</template>
<script setup>
import { reactive } from 'vue';
const state = reactive({ tabKey: 1 })
const tabsChange = (item) => {
    console.log(item);
    state.tabKey = item.paneKey;
}
</script>